package com.example.project7.viewmodel;

import com.example.project7.model.LoginResponse;

public abstract class LoginState {
    private LoginState() {}

    public static class Loading extends LoginState {
        @Override
        public String toString() {
            return "LoginState.Loading";
        }
    }

    public static class Success extends LoginState {
        private LoginResponse data;

        public Success(LoginResponse data) {
            this.data = data;
        }

        public LoginResponse getData() {
            return data;
        }

        @Override
        public String toString() {
            return "LoginState.Success";
        }
    }

    public static class Error extends LoginState {
        private String errorMessage;

        public Error(String errorMessage) {
            this.errorMessage = errorMessage;
        }

        public String getErrorMessage() {
            return errorMessage;
        }

        @Override
        public String toString() {
            return "LoginState.Error: " + errorMessage;
        }
    }
}